A cylinder includes a cylinder body, a piston that moves reciprocally between one end and another end inside the cylinder body, and a piston rod integrally connected to the piston. A first cylinder chamber is formed between the one end and the piston inside the cylinder body, and a second cylinder chamber is formed between the other end and the piston inside the cylinder body. In this instance, by supplying fluid from a fluid supply source to the first cylinder chamber via a first tube, or by supplying fluid to the second cylinder chamber via a second tube, the piston and the piston rod are capable of moving reciprocally between the one end and the other end inside the cylinder body.
Incidentally, by installing proximity sensors in the vicinity of the cylinder, detection of the arrival of the piston at the one end or the other end inside the cylinder body has conventionally been carried out. For example, in the case that limit sensors are installed as such proximity sensors, at a time that a distal end of the piston rod, which protrudes outside of the cylinder body, and the limit sensors come into mechanical contact, contact points in the interior of the limit sensors are switched, and detection signals indicating arrival of the piston are output from the limit sensors. Further, in Japanese Patent No. 3857187, it is disclosed to incorporate a magnet in a piston rod, and position detecting sensors which detect magnetism of the magnet are provided at the one end and the other end of the cylinder body.